public class ClimbStairs {
    int[] men;
    public int solution(int n){
        men=new int[n+1];
        return drop(n);
    }

    public int drop(int n){
        if(n<=2){
            return n;
        }
        if(men[n]>0){
            return men[n];
        }

        men[n]=drop(n-1)+drop(n-2);
        return men[n];

    }

    public static void main(String[] args) {
        ClimbStairs climbStairs=new ClimbStairs();
        System.out.println(climbStairs.solution(3));
    }
}
